from Common.basepage import BasePage
from PageLocators.MainPage_locator import MainPageLocator as loc
import re
from Common.handle_log import do_log
from Common.connect_to_device import d_one

import time


class MainPage(BasePage):

    def click_AV(self):
        self.click_element(loc.AV_loc, "选择AV模式")

    def click_SynPlay(self):
        self.click_element(loc.start_SynPlay_loc, "主页_同步播放")

    def click_share(self):
        self.click_element(loc.start_share_loc, "点击开始分享")

    def click_slave_invite(self):
        self.click_element(loc.choice_dev_loc, "点击邀请从机")

    def click_back(self):
        self.click_element(loc.back_loc, "点击返回")


if __name__ == '__main__':
    MainPage(device="d_one").click_SynPlay()
    MainPage(device="d_one").click_share()
    MainPage(device="d_one").click_slave_invite()
